package com.bootdo.wx.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bootdo.wx.dao.SalesCouponDao;
import com.bootdo.wx.domain.SalesCouponDO;
import com.bootdo.wx.service.SalesCouponService;



@Service
public class SalesCouponServiceImpl implements SalesCouponService {
	@Autowired
	private SalesCouponDao salesCouponDao;
	
	@Override
	public SalesCouponDO get(String id){
		return salesCouponDao.get(id);
	}
	
	@Override
	public List<SalesCouponDO> list(Map<String, Object> map){
		return salesCouponDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return salesCouponDao.count(map);
	}
	
	@Override
	public int save(SalesCouponDO salesCoupon){
		return salesCouponDao.save(salesCoupon);
	}
	
	@Override
	public int update(SalesCouponDO salesCoupon){
		return salesCouponDao.update(salesCoupon);
	}
	
	@Override
	public int remove(String id){
		return salesCouponDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return salesCouponDao.batchRemove(ids);
	}

	@Override
	public List<SalesCouponDO> getCouponS() {
		Map<String, Object> map = new HashMap<>();
		map.put("hasScore", "0");
		map.put("status", "0");
		map.put("delFlag", "0");
		return salesCouponDao.getCanList(map);
	}
	
}
